<?php
include_once('../../admin/php/includes/definer.php');
include_once(INC.'admin/php/bootstrap.php');

if (!Doctrine::getTable('email')->findOneByValue($_POST['email'])) {
    $email = new Email();
    $email->value = $_POST['email'];
    $email->descargado = 0;
    $email->save();
}

header('location: '.$_SERVER['HTTP_REFERER'].'#newsletterSuccess');
?>
